//
//  CarViewCell.swift
//  TrafficViolation
//
//  Created by clover on 2017/4/15.
//  Copyright © 2017年 eaglelive. All rights reserved.
//

import UIKit

class CarViewCell : UICollectionViewCell {
    var img = UIImageView()
    var carnum = UILabel()
    var remark = UILabel()
    var edit = UIButton()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        img = UIImageView.init(frame: CGRect(x: 10, y: 10, width: 100, height: 70))
        self.contentView.addSubview(img) //车辆图片 预留位置
        
        carnum = UILabel.init(frame: CGRect(x: 120, y: 20, width: 100, height: 20))
        carnum.textAlignment = .left // 标题
        carnum.font = UIFont.systemFont(ofSize: 16) //设置标题字体大小
        carnum.textColor = UIColor.black
        self.contentView.addSubview(carnum) //车牌号码
        
        edit = UIButton.init(frame: CGRect(x: kScreenW - 70, y: 10, width: 20, height: 20 ))
        edit.setBackgroundImage(UIImage(named: "bianji"), for: .normal)
        self.contentView.addSubview(edit)
        
        remark = UILabel.init(frame: CGRect(x: 120, y: 40, width: 100, height: 30))
        remark.textAlignment = .left // 标题
        remark.font = UIFont.systemFont(ofSize: 12) //设置标题字体大小
        remark.numberOfLines = 0
        remark.textColor = UIColor.lightGray
        self.contentView.addSubview(remark) //备注信息
        
        self.backgroundColor = UIColor.white
        self.layer.cornerRadius = 10
        self.layer.masksToBounds = true
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
}
